<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="content">
        <h2>静夜思</h2>
        <ul>
            <li>窗前明月光</li>
            <li>凝视地上霜</li>
            <li>举头望明月</li>
            <li>低头思故乡</li>
        </ul>

    </div>

    <div class="btn">
        <button type="button" disabled="disabled"></button>
    </div>


    <script>
        var btn = document.querySelector('button')
        var num = 10;
        btn.innerHTML = num;
        var time = setInterval(function(){
            num--;
            btn.innerHTML = num
            if(num === 0){
                btn.innerHTML = "确定";
                btn.disabled = false;
                clearInterval(time)
            }
        },1000)


        //1s 后执行
        // function run(){
        //     setTimeout(function(){
        //         console.log("sadsad")
        //     },3000)
        // }

        // run();






    </script>
</body>
</html>